package com.swak.frame.exception;

import com.swak.frame.enums.BasicErrCode;
import com.swak.frame.enums.IResultCode;
import com.swak.frame.exception.core.BaseException;

/**
 * Infrastructure Exception
 * 
 * @author colley.ma
 * @since 2022/07/14
 */
public class SwakException extends BaseException {

	private static final long serialVersionUID = 1L;

	public SwakException(Throwable cause) {
		super(cause);
		this.setErrCode(BasicErrCode.SWAK_ERROR);
	}

	public SwakException(String errMessage) {
		super(errMessage);
		this.setErrCode(BasicErrCode.SWAK_ERROR);
	}

	public SwakException(String errMessage, Throwable e) {
		super(errMessage, e);
		this.setErrCode(BasicErrCode.SWAK_ERROR);
	}

	public SwakException(IResultCode errCode, String errMessage) {
		super(errMessage);
		this.setErrCode(errCode);
	}

	public SwakException(Integer errCode, String errMessage) {
		super(errCode,errMessage);
	}
}